import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import filters from '@/plugins/filters/index';
import 'element-ui/lib/theme-chalk/index.css'
import '@/common/css/element-reset.scss'
import "./assets/common.scss"
import '@/common/css/package/index.scss';
import { done } from 'nprogress'
import components from '@/common/js/components';
import nodeWrap from './components/process/nodeWrap.vue'

Vue.component('nodeWrap', nodeWrap); //初始化组件
Vue.use(components);
Vue.use(ElementUI) // 注册element-ui
import '../../lib/lib'; // 公用库
import routerFilter from '@/lib/routerFilter.js'
import store from './store/index'

Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key]);
});

router.beforeEach((to, from, next) => {
  routerFilter(to, from, next)
})

router.afterEach(() => {
  done()
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
